

<div class="row-fluid">
    <div class="span12">
        <div id="pagination" class="btn-group"><?= $pagination ?></div>
    </div>
</div>
<form action="<?= base_url() ?><?= get_segment(1) ?>/<?= get_segment(2) ?>/all" method="post" style="margin-bottom: 5px;" />
<div class="row-fluid">
    <div class="span12">
        <div  class="box">
            <div class="tab-header"> <?=lang('label_browser')?> [<?= $count ?>] </div>

            <div id='data_contant'>

                <table class="table">
                    <thead>
                        <tr>
                            <th><input type="checkbox" id="checkall" name="all"></th>
                            <th><?=lang('label_title')?></th>
                            <th><?=lang('label_add_by')?></th>
                            <th><?=lang('label_user_update')?></th>
                            <th><?=lang('label_created_date')?></th>
                            <th><?=lang('label_last_update')?></th>

                            <th><?=lang('label_tool')?></th>
                        </tr>
                    </thead>
                     <tbody>
                    <?
                    foreach ($result as $value) {
                        $user_update_data=get_userdata_with_id($value->user_update, 'id,username')
                        ?>
                       
                            <tr class="gradeA">
                                <td><input type="checkbox" class="checkall" value="<?= $value->id ?>" name="id[]"></td>
                                <td class="w300">

                                    <a href="<?= base_url() . ADMIN_FOLDER ?>/<?= get_segment(2) ?>/view/<?= $value->id ?>">
                                        <?= $value->title ?>

                                    </a>
                                </td>
                                <td>
                                    <?
                                    if ($value->username) {
                                        ?>
                                    <a href='<?= base_url() . ADMIN_FOLDER ?>/<?=get_segment(2)?>/view/<?= $value->user_id ?>'><?= $value->username ?></a>
                                        <?
                                    } else {
                                        ?>
                                        -----
                                        <?
                                    }
                                    ?>

                                </td>
                                <td>
                                    <a href='<?= base_url() . ADMIN_FOLDER ?>/users/view/<?= $value->user_update ?>'>
                                            <?=$user_update_data['username']?>
                                    </a>
                                    </td>
                                <td><?=timespan($value->create_date,time())?></td>
                                <td><?=timespan($value->update_date,time())?></td>
                                <td class="center">
                                    <div class="btn-group">
                                        <button class="btn dropdown-toggle" data-toggle="dropdown"><i class="icon-cog"></i>  <?=lang('label_operation')?> <span class="caret"></span></button>
                                        <ul class="dropdown-menu">

                                            <li><a    href="<?= base_url() . ADMIN_FOLDER ?>/<?=get_segment(2)?>/edit/<?= $value->id ?>"><i class="icon-edit"></i>  <?=lang('label_edit')?></a></li>
                                            <li><a  class="delete_confirm " href="<?= base_url() . ADMIN_FOLDER ?>/<?=get_segment(2)?>/delete/<?= $value->id ?>"><i  class="icon-trash"></i> <?=lang('label_delete')?></a></li>
                                        </ul>
                                    </div>

                                </td>
                            </tr>
                        <? } ?>
                    </tbody>
                </table>

            </div>

            <div class="footer_tool_box">

                <select class="droop_tool_box" name='doaction'>
                    <option value=""><?=lang('label_choose_fromlist')?></option>
                    <!--                    <option value="default"><?=lang('label_default')?></option>-->
                    <!--                     <option value="undefault">{Un Default}</option>-->
                    <option value="delete"><?=lang('label_delete')?></option>
                </select>
                <button class="btn btn-primary" id='execution' type="submit"><?=lang('label_execution')?></button>

            </div>

        </div>
    </div>

</div>



</form>
<div class="row-fluid">
    <div class="span12">
        <div id="pagination" class="btn-group"><?= $pagination ?></div>
    </div>
</div>


